]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
WorkspacesView: separate setting the full and the actual geometry
authorGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 8 May 2014 17:15:19 +0000 (19:15 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 26 Jun 2014 17:20:17 +0000 (19:20 +0200)
They are different properties, they deserve different syncs.
Especially because a full allocation cycle sets both anyway, so
we should save some cycles this way.

https://bugzilla.gnome.org/show_bug.cgi?id=729823

js/ui/workspacesView.js

index 5af58981df047ba6594e20e142dbd85e322952b8..3dfbe1e9b940695182d895a9feee568efefb4164 100644 (file)
@@ -74,12 +74,12 @@ const WorkspacesViewBase = new Lang.Class({
 
     setFullGeometry: function(geom) {
         this._fullGeometry = geom;
-        this._syncGeometry();
+        this._syncFullGeometry();
     },
 
     setActualGeometry: function(geom) {
         this._actualGeometry = geom;
-        this._syncGeometry();
+        this._syncActualGeometry();
     },
 });
 
@@ -127,9 +127,12 @@ const WorkspacesView = new Lang.Class({
             this._workspaces[i].setReservedSlot(clone);
     },
 
-    _syncGeometry: function() {
+    _syncFullGeometry: function() {
         for (let i = 0; i < this._workspaces.length; i++)
             this._workspaces[i].setFullGeometry(this._fullGeometry);
+    },
+
+    _syncActualGeometry: function() {
         for (let i = 0; i < this._workspaces.length; i++)
             this._workspaces[i].setActualGeometry(this._actualGeometry);
     },
@@ -260,10 +263,12 @@ const WorkspacesView = new Lang.Class({
             }
         }
 
-        if (this._fullGeometry)
+        if (this._fullGeometry) {
             this._updateWorkspaceActors(false);
-
-        this._syncGeometry();
+            this._syncFullGeometry();
+        }
+        if (this._actualGeometry)
+            this._syncActualGeometry();
     },
 
     _activeWorkspaceChanged: function(wm, from, to, direction) {
@@ -352,8 +357,11 @@ const ExtraWorkspaceView = new Lang.Class({
         this._workspace.setReservedSlot(clone);
     },
 
-    _syncGeometry: function() {
+    _syncFullGeometry: function() {
         this._workspace.setFullGeometry(this._fullGeometry);
+    },
+
+    _syncActualGeometry: function() {
         this._workspace.setActualGeometry(this._actualGeometry);
     },